package com.woniu.account.form;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;

@Data
public class RegisterCoachForm {

    /**
     * 用户名
     */
    @NotBlank(message = "账号名不能为空")
    @Length(max = 20, message = "用户名不能超过20个字符")
    @Length(min = 3, message = "用户名不能小于3个字符")
    private String coachName;
    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @Length(max = 20, message = "密码不能超过20个字符")
    @Length(min = 6, message = "密码不能小于6个字符")
    private String coachPass;

    /**
     * 昵称
     */
    @NotBlank(message = "昵称不能为空")
    @Length(max = 10, message = "昵称不能超过10个字符")
    private String coachNickname;

    /**
     * 电话
     */
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    private String coachPhone;

    /**
     * 邮箱
     */
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式错误")
    private String coachEmail;



}
